function f=T1j_Normal(x,j,mu,sigma)

if (j==0)
     f=1;
end

if (j==1) 
     f=mu+x;
end

if (j==2) 
     f=sigma.^2+(mu+x).^2;
end 

if (j==3) 
     f=(mu+x).*(3.*sigma.^2+(mu+x).^2);
end 

if (j==4) 
     f=mu.^4+3.*sigma.^4+4.*mu.^3.*x+6.*sigma.^2.*x.^2+x.^4+6.*mu.^2.*( ...
  sigma.^2+x.^2)+4.*mu.*(3.*sigma.^2.*x+x.^3);
end 

if (j==5) 
     f=(mu+x).*(mu.^4+15.*sigma.^4+4.*mu.^3.*x+10.*sigma.^2.*x.^2+x.^4+2.* ...
  mu.^2.*(5.*sigma.^2+3.*x.^2)+4.*mu.*(5.*sigma.^2.*x+x.^3));
end 

if (j==6) 
     f=mu.^6+15.*sigma.^6+6.*mu.^5.*x+45.*sigma.^4.*x.^2+15.*sigma.^2.*x.^4+ ...
  x.^6+15.*mu.^4.*(sigma.^2+x.^2)+20.*mu.^3.*(3.*sigma.^2.*x+x.^3)+15.* ...
  mu.^2.*(3.*sigma.^4+6.*sigma.^2.*x.^2+x.^4)+6.*mu.*(15.*sigma.^4.*x+10.* ...
  sigma.^2.*x.^3+x.^5);
end 

if (j==7) 
     f=(mu+x).*(mu.^6+105.*sigma.^6+6.*mu.^5.*x+105.*sigma.^4.*x.^2+21.* ...
  sigma.^2.*x.^4+x.^6+3.*mu.^4.*(7.*sigma.^2+5.*x.^2)+4.*mu.^3.*(21.* ...
  sigma.^2.*x+5.*x.^3)+3.*mu.^2.*(35.*sigma.^4+42.*sigma.^2.*x.^2+5.*x.^4) ...
  +6.*mu.*(35.*sigma.^4.*x+14.*sigma.^2.*x.^3+x.^5));
end 

if (j==8) 
     f=mu.^8+105.*sigma.^8+8.*mu.^7.*x+420.*sigma.^6.*x.^2+210.*sigma.^4.*x.^4+ ...
  28.*sigma.^2.*x.^6+x.^8+28.*mu.^6.*(sigma.^2+x.^2)+56.*mu.^5.*(3.* ...
  sigma.^2.*x+x.^3)+70.*mu.^4.*(3.*sigma.^4+6.*sigma.^2.*x.^2+x.^4)+56.* ...
  mu.^3.*(15.*sigma.^4.*x+10.*sigma.^2.*x.^3+x.^5)+28.*mu.^2.*(15.* ...
  sigma.^6+45.*sigma.^4.*x.^2+15.*sigma.^2.*x.^4+x.^6)+8.*mu.*(105.* ...
  sigma.^6.*x+105.*sigma.^4.*x.^3+21.*sigma.^2.*x.^5+x.^7);
end 

if (j==9) 
     f=(mu+x).*(mu.^8+945.*sigma.^8+8.*mu.^7.*x+1260.*sigma.^6.*x.^2+378.* ...
  sigma.^4.*x.^4+36.*sigma.^2.*x.^6+x.^8+4.*mu.^6.*(9.*sigma.^2+7.*x.^2)+ ...
  8.*mu.^5.*(27.*sigma.^2.*x+7.*x.^3)+mu.^4.*(378.*sigma.^4+540.* ...
  sigma.^2.*x.^2+70.*x.^4)+8.*mu.^3.*(189.*sigma.^4.*x+90.*sigma.^2.*x.^3+ ...
  7.*x.^5)+4.*mu.^2.*(315.*sigma.^6+567.*sigma.^4.*x.^2+135.*sigma.^2.* ...
  x.^4+7.*x.^6)+8.*mu.*(315.*sigma.^6.*x+189.*sigma.^4.*x.^3+27.* ...
  sigma.^2.*x.^5+x.^7));
end 

if (j==10) 
     f=mu.^10+945.*sigma.^10+10.*mu.^9.*x+4725.*sigma.^8.*x.^2+3150.*sigma.^6.* ...
  x.^4+630.*sigma.^4.*x.^6+45.*sigma.^2.*x.^8+x.^10+45.*mu.^8.*(sigma.^2+ ...
  x.^2)+120.*mu.^7.*(3.*sigma.^2.*x+x.^3)+210.*mu.^6.*(3.*sigma.^4+6.* ...
  sigma.^2.*x.^2+x.^4)+252.*mu.^5.*(15.*sigma.^4.*x+10.*sigma.^2.*x.^3+ ...
  x.^5)+210.*mu.^4.*(15.*sigma.^6+45.*sigma.^4.*x.^2+15.*sigma.^2.*x.^4+ ...
  x.^6)+120.*mu.^3.*(105.*sigma.^6.*x+105.*sigma.^4.*x.^3+21.*sigma.^2.* ...
  x.^5+x.^7)+45.*mu.^2.*(105.*sigma.^8+420.*sigma.^6.*x.^2+210.*sigma.^4.* ...
  x.^4+28.*sigma.^2.*x.^6+x.^8)+10.*mu.*(945.*sigma.^8.*x+1260.*sigma.^6.* ...
  x.^3+378.*sigma.^4.*x.^5+36.*sigma.^2.*x.^7+x.^9);
end 

if (j==11) 
     f=(mu+x).*(mu.^10+10395.*sigma.^10+10.*mu.^9.*x+17325.*sigma.^8.*x.^2+ ...
  6930.*sigma.^6.*x.^4+990.*sigma.^4.*x.^6+55.*sigma.^2.*x.^8+x.^10+5.* ...
  mu.^8.*(11.*sigma.^2+9.*x.^2)+40.*mu.^7.*(11.*sigma.^2.*x+3.*x.^3)+10.* ...
  mu.^6.*(99.*sigma.^4+154.*sigma.^2.*x.^2+21.*x.^4)+4.*mu.^5.*(1485.* ...
  sigma.^4.*x+770.*sigma.^2.*x.^3+63.*x.^5)+10.*mu.^4.*(693.*sigma.^6+ ...
  1485.*sigma.^4.*x.^2+385.*sigma.^2.*x.^4+21.*x.^6)+40.*mu.^3.*(693.* ...
  sigma.^6.*x+495.*sigma.^4.*x.^3+77.*sigma.^2.*x.^5+3.*x.^7)+5.*mu.^2.*( ...
  3465.*sigma.^8+8316.*sigma.^6.*x.^2+2970.*sigma.^4.*x.^4+308.*sigma.^2.* ...
  x.^6+9.*x.^8)+10.*mu.*(3465.*sigma.^8.*x+2772.*sigma.^6.*x.^3+594.* ...
  sigma.^4.*x.^5+44.*sigma.^2.*x.^7+x.^9));
end 

if (j==12) 
     f=mu.^12+10395.*sigma.^12+12.*mu.^11.*x+62370.*sigma.^10.*x.^2+51975.* ...
  sigma.^8.*x.^4+13860.*sigma.^6.*x.^6+1485.*sigma.^4.*x.^8+66.*sigma.^2.* ...
  x.^10+x.^12+66.*mu.^10.*(sigma.^2+x.^2)+220.*mu.^9.*(3.*sigma.^2.*x+ ...
  x.^3)+495.*mu.^8.*(3.*sigma.^4+6.*sigma.^2.*x.^2+x.^4)+792.*mu.^7.*(15.* ...
  sigma.^4.*x+10.*sigma.^2.*x.^3+x.^5)+924.*mu.^6.*(15.*sigma.^6+45.* ...
  sigma.^4.*x.^2+15.*sigma.^2.*x.^4+x.^6)+792.*mu.^5.*(105.*sigma.^6.*x+ ...
  105.*sigma.^4.*x.^3+21.*sigma.^2.*x.^5+x.^7)+495.*mu.^4.*(105.*sigma.^8+ ...
  420.*sigma.^6.*x.^2+210.*sigma.^4.*x.^4+28.*sigma.^2.*x.^6+x.^8)+220.* ...
  mu.^3.*(945.*sigma.^8.*x+1260.*sigma.^6.*x.^3+378.*sigma.^4.*x.^5+36.* ...
  sigma.^2.*x.^7+x.^9)+66.*mu.^2.*(945.*sigma.^10+4725.*sigma.^8.*x.^2+ ...
  3150.*sigma.^6.*x.^4+630.*sigma.^4.*x.^6+45.*sigma.^2.*x.^8+x.^10)+12.* ...
  mu.*(10395.*sigma.^10.*x+17325.*sigma.^8.*x.^3+6930.*sigma.^6.*x.^5+ ...
  990.*sigma.^4.*x.^7+55.*sigma.^2.*x.^9+x.^11);
end 

if (j==13) 
     f=sigma.^12.*(mu.^13.*sigma.^(-12)+13.*mu.^12.*sigma.^(-12).*x+78.* ...
  mu.^11.*sigma.^(-12).*x.^2+286.*mu.^10.*sigma.^(-12).*x.^3+715.*mu.^9.* ...
  sigma.^(-12).*x.^4+1287.*mu.^8.*sigma.^(-12).*x.^5+1716.*mu.^7.*sigma.^( ...
  -12).*x.^6+1716.*mu.^6.*sigma.^(-12).*x.^7+1287.*mu.^5.*sigma.^(-12).* ...
  x.^8+715.*mu.^4.*sigma.^(-12).*x.^9+286.*mu.^3.*sigma.^(-12).*x.^10+78.* ...
  mu.^2.*sigma.^(-12).*x.^11+13.*mu.*sigma.^(-12).*x.^12+sigma.^(-12).* ...
  x.^13+135135.*(mu+x)+270270.*sigma.^(-2).*(mu+x).^3+135135.*sigma.^(-4) ...
  .*(mu+x).^5+25740.*sigma.^(-6).*(mu+x).^7+2145.*sigma.^(-8).*(mu+x).^9+ ...
  78.*sigma.^(-10).*(mu+x).^11);
end 

if (j==14) 
     f=mu.^14+135135.*sigma.^14+14.*mu.^13.*x+945945.*sigma.^12.*x.^2+945945.* ...
  sigma.^10.*x.^4+315315.*sigma.^8.*x.^6+45045.*sigma.^6.*x.^8+3003.* ...
  sigma.^4.*x.^10+91.*sigma.^2.*x.^12+x.^14+91.*mu.^12.*(sigma.^2+x.^2)+ ...
  364.*mu.^11.*(3.*sigma.^2.*x+x.^3)+1001.*mu.^10.*(3.*sigma.^4+6.* ...
  sigma.^2.*x.^2+x.^4)+2002.*mu.^9.*(15.*sigma.^4.*x+10.*sigma.^2.*x.^3+ ...
  x.^5)+3003.*mu.^8.*(15.*sigma.^6+45.*sigma.^4.*x.^2+15.*sigma.^2.*x.^4+ ...
  x.^6)+3432.*mu.^7.*(105.*sigma.^6.*x+105.*sigma.^4.*x.^3+21.*sigma.^2.* ...
  x.^5+x.^7)+3003.*mu.^6.*(105.*sigma.^8+420.*sigma.^6.*x.^2+210.* ...
  sigma.^4.*x.^4+28.*sigma.^2.*x.^6+x.^8)+2002.*mu.^5.*(945.*sigma.^8.*x+ ...
  1260.*sigma.^6.*x.^3+378.*sigma.^4.*x.^5+36.*sigma.^2.*x.^7+x.^9)+1001.* ...
  mu.^4.*(945.*sigma.^10+4725.*sigma.^8.*x.^2+3150.*sigma.^6.*x.^4+630.* ...
  sigma.^4.*x.^6+45.*sigma.^2.*x.^8+x.^10)+364.*mu.^3.*(10395.*sigma.^10.* ...
  x+17325.*sigma.^8.*x.^3+6930.*sigma.^6.*x.^5+990.*sigma.^4.*x.^7+55.* ...
  sigma.^2.*x.^9+x.^11)+91.*mu.^2.*(10395.*sigma.^12+62370.*sigma.^10.* ...
  x.^2+51975.*sigma.^8.*x.^4+13860.*sigma.^6.*x.^6+1485.*sigma.^4.*x.^8+ ...
  66.*sigma.^2.*x.^10+x.^12)+14.*mu.*(135135.*sigma.^12.*x+270270.* ...
  sigma.^10.*x.^3+135135.*sigma.^8.*x.^5+25740.*sigma.^6.*x.^7+2145.* ...
  sigma.^4.*x.^9+78.*sigma.^2.*x.^11+x.^13);
end 

if (j==15) 
     f=sigma.^14.*(mu.^15.*sigma.^(-14)+15.*mu.^14.*sigma.^(-14).*x+105.* ...
  mu.^13.*sigma.^(-14).*x.^2+455.*mu.^12.*sigma.^(-14).*x.^3+1365.* ...
  mu.^11.*sigma.^(-14).*x.^4+3003.*mu.^10.*sigma.^(-14).*x.^5+5005.* ...
  mu.^9.*sigma.^(-14).*x.^6+6435.*mu.^8.*sigma.^(-14).*x.^7+6435.*mu.^7.* ...
  sigma.^(-14).*x.^8+5005.*mu.^6.*sigma.^(-14).*x.^9+3003.*mu.^5.*sigma.^( ...
  -14).*x.^10+1365.*mu.^4.*sigma.^(-14).*x.^11+455.*mu.^3.*sigma.^(-14).* ...
  x.^12+105.*mu.^2.*sigma.^(-14).*x.^13+15.*mu.*sigma.^(-14).*x.^14+ ...
  sigma.^(-14).*x.^15+2027025.*(mu+x)+4729725.*sigma.^(-2).*(mu+x).^3+ ...
  2837835.*sigma.^(-4).*(mu+x).^5+675675.*sigma.^(-6).*(mu+x).^7+75075.* ...
  sigma.^(-8).*(mu+x).^9+4095.*sigma.^(-10).*(mu+x).^11+105.*sigma.^(-12) ...
  .*(mu+x).^13);
end 

if (j==16) 
     f=mu.^16+2027025.*sigma.^16+16.*mu.^15.*x+120.*mu.^14.*x.^2+560.*mu.^13.* ...
  x.^3+1820.*mu.^12.*x.^4+4368.*mu.^11.*x.^5+8008.*mu.^10.*x.^6+11440.* ...
  mu.^9.*x.^7+12870.*mu.^8.*x.^8+11440.*mu.^7.*x.^9+8008.*mu.^6.*x.^10+ ...
  4368.*mu.^5.*x.^11+1820.*mu.^4.*x.^12+560.*mu.^3.*x.^13+120.*mu.^2.* ...
  x.^14+16.*mu.*x.^15+x.^16+16216200.*sigma.^14.*(mu+x).^2+18918900.* ...
  sigma.^12.*(mu+x).^4+7567560.*sigma.^10.*(mu+x).^6+1351350.*sigma.^8.*( ...
  mu+x).^8+120120.*sigma.^6.*(mu+x).^10+5460.*sigma.^4.*(mu+x).^12+120.* ...
  sigma.^2.*(mu+x).^14;
end 

if (j==17) 
     f=sigma.^16.*(mu.^17.*sigma.^(-16)+17.*mu.^16.*sigma.^(-16).*x+136.* ...
  mu.^15.*sigma.^(-16).*x.^2+680.*mu.^14.*sigma.^(-16).*x.^3+2380.* ...
  mu.^13.*sigma.^(-16).*x.^4+6188.*mu.^12.*sigma.^(-16).*x.^5+12376.* ...
  mu.^11.*sigma.^(-16).*x.^6+19448.*mu.^10.*sigma.^(-16).*x.^7+24310.* ...
  mu.^9.*sigma.^(-16).*x.^8+24310.*mu.^8.*sigma.^(-16).*x.^9+19448.* ...
  mu.^7.*sigma.^(-16).*x.^10+12376.*mu.^6.*sigma.^(-16).*x.^11+6188.* ...
  mu.^5.*sigma.^(-16).*x.^12+2380.*mu.^4.*sigma.^(-16).*x.^13+680.*mu.^3.* ...
  sigma.^(-16).*x.^14+136.*mu.^2.*sigma.^(-16).*x.^15+17.*mu.*sigma.^(-16) ...
  .*x.^16+sigma.^(-16).*x.^17+34459425.*(mu+x)+91891800.*sigma.^(-2).*(mu+ ...
  x).^3+64324260.*sigma.^(-4).*(mu+x).^5+18378360.*sigma.^(-6).*(mu+x).^7+ ...
  2552550.*sigma.^(-8).*(mu+x).^9+185640.*sigma.^(-10).*(mu+x).^11+7140.* ...
  sigma.^(-12).*(mu+x).^13+136.*sigma.^(-14).*(mu+x).^15);
end 

if (j==18) 
     f=mu.^18+34459425.*sigma.^18+18.*mu.^17.*x+153.*mu.^16.*x.^2+816.*mu.^15.* ...
  x.^3+3060.*mu.^14.*x.^4+8568.*mu.^13.*x.^5+18564.*mu.^12.*x.^6+31824.* ...
  mu.^11.*x.^7+43758.*mu.^10.*x.^8+48620.*mu.^9.*x.^9+43758.*mu.^8.*x.^10+ ...
  31824.*mu.^7.*x.^11+18564.*mu.^6.*x.^12+8568.*mu.^5.*x.^13+3060.*mu.^4.* ...
  x.^14+816.*mu.^3.*x.^15+153.*mu.^2.*x.^16+18.*mu.*x.^17+x.^18+ ...
  310134825.*sigma.^16.*(mu+x).^2+413513100.*sigma.^14.*(mu+x).^4+ ...
  192972780.*sigma.^12.*(mu+x).^6+41351310.*sigma.^10.*(mu+x).^8+4594590.* ...
  sigma.^8.*(mu+x).^10+278460.*sigma.^6.*(mu+x).^12+9180.*sigma.^4.*(mu+x) ...
  .^14+153.*sigma.^2.*(mu+x).^16;
end 

if (j==19) 
     f=sigma.^18.*(mu.^19.*sigma.^(-18)+19.*mu.^18.*sigma.^(-18).*x+171.* ...
  mu.^17.*sigma.^(-18).*x.^2+969.*mu.^16.*sigma.^(-18).*x.^3+3876.* ...
  mu.^15.*sigma.^(-18).*x.^4+11628.*mu.^14.*sigma.^(-18).*x.^5+27132.* ...
  mu.^13.*sigma.^(-18).*x.^6+50388.*mu.^12.*sigma.^(-18).*x.^7+75582.* ...
  mu.^11.*sigma.^(-18).*x.^8+92378.*mu.^10.*sigma.^(-18).*x.^9+92378.* ...
  mu.^9.*sigma.^(-18).*x.^10+75582.*mu.^8.*sigma.^(-18).*x.^11+50388.* ...
  mu.^7.*sigma.^(-18).*x.^12+27132.*mu.^6.*sigma.^(-18).*x.^13+11628.* ...
  mu.^5.*sigma.^(-18).*x.^14+3876.*mu.^4.*sigma.^(-18).*x.^15+969.*mu.^3.* ...
  sigma.^(-18).*x.^16+171.*mu.^2.*sigma.^(-18).*x.^17+19.*mu.*sigma.^(-18) ...
  .*x.^18+sigma.^(-18).*x.^19+654729075.*(mu+x)+1964187225.*sigma.^(-2).*( ...
  mu+x).^3+1571349780.*sigma.^(-4).*(mu+x).^5+523783260.*sigma.^(-6).*(mu+ ...
  x).^7+87297210.*sigma.^(-8).*(mu+x).^9+7936110.*sigma.^(-10).*(mu+x) ...
  .^11+406980.*sigma.^(-12).*(mu+x).^13+11628.*sigma.^(-14).*(mu+x).^15+ ...
  171.*sigma.^(-16).*(mu+x).^17);
end 


 if size(f,1)==1
     f=ones(size(x,1),1)*f;
 end
 %
